<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>kvBusParamsTq Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="kvaser.gif"/></td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('structkv_bus_params_tq.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">kvBusParamsTq Struct Reference<div class="ingroups"><a class="el" href="group__grp__canlib.html">CANlib</a> &raquo; <a class="el" href="group___c_a_n.html">CAN</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="canlib_8h_source.html">canlib.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a4559f9255ccc9f785a33412fe5496d1a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_bus_params_tq.html#a4559f9255ccc9f785a33412fe5496d1a">tq</a></td></tr>
<tr class="separator:a4559f9255ccc9f785a33412fe5496d1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8c2aacf694615ddaff84e31b31ae0ff"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_bus_params_tq.html#aa8c2aacf694615ddaff84e31b31ae0ff">phase1</a></td></tr>
<tr class="separator:aa8c2aacf694615ddaff84e31b31ae0ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87167f9802ef5563e4236d5710e1b65b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_bus_params_tq.html#a87167f9802ef5563e4236d5710e1b65b">phase2</a></td></tr>
<tr class="separator:a87167f9802ef5563e4236d5710e1b65b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b769dc9a0e203dea3cc931bdb304377"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_bus_params_tq.html#a3b769dc9a0e203dea3cc931bdb304377">sjw</a></td></tr>
<tr class="separator:a3b769dc9a0e203dea3cc931bdb304377"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a8f6c91eefb9c6bf448592aac44153d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_bus_params_tq.html#a4a8f6c91eefb9c6bf448592aac44153d">prop</a></td></tr>
<tr class="separator:a4a8f6c91eefb9c6bf448592aac44153d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af263c600d546b48e74f8f7ac7a891533"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_bus_params_tq.html#af263c600d546b48e74f8f7ac7a891533">prescaler</a></td></tr>
<tr class="separator:af263c600d546b48e74f8f7ac7a891533"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><b>Constraints</b> </p><pre class="fragment">Constraints that must be fulfilled when opening channel in classic CAN Mode:

  tq         = 1 + prop + phase1 + phase2
  tq        &gt;= 3
  sjw       &lt;= min(phase1, phase2)
  prescaler &gt;= 1
</pre><pre class="fragment">  Constraints that must be fulfilled when opening channel in CAN FD Mode:

  arbitration.tq         = 1 + arbitration.prop + arbitration.phase1 + arbitration.phase2
  arbitration.tq        &gt;= 3
  arbitration.sjw       &lt;= min(arbitration.phase1, arbitration.phase2)
  arbitration.prescaler &gt;= 1  (&lt;=2 will enable Transmitter Delay Compensation Mechanism)

  data.tq         = 1 + data.phase1 + data.phase2
  data.tq        &gt;= 3
  data.sjw       &lt;= min(data.phase1, data.phase2)
  data.prop       = 0
  data.prescaler  = arbitration.prescaler
</pre><p>Used in <a class="el" href="group___c_a_n.html#ga50f169c6f9dd6df93b17c322e8e4fd00">canSetBusParamsTq</a>, <a class="el" href="group___c_a_n.html#ga4beeb28ede2e21a2988076e66f873723">canSetBusParamsFdTq</a>, <a class="el" href="group___c_a_n.html#gae517a9c243c446e040f6f8898d09a677">canGetBusParamsTq</a> and <a class="el" href="group___c_a_n.html#gae517a9c243c446e040f6f8898d09a677">canGetBusParamsTq</a> </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="example_2c_2busparams_tq_8c-example.html#_a2">example/c/busparams_tq.c</a>.</dd>
</dl></div><h2 class="groupheader">Field Documentation</h2>
<a id="aa8c2aacf694615ddaff84e31b31ae0ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8c2aacf694615ddaff84e31b31ae0ff">&#9670;&nbsp;</a></span>phase1</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int phase1</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Phase segment 1, in number of time quanta </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="example_2c_2busparams_tq_8c-example.html#a10">example/c/busparams_tq.c</a>.</dd>
</dl>
</div>
</div>
<a id="a87167f9802ef5563e4236d5710e1b65b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87167f9802ef5563e4236d5710e1b65b">&#9670;&nbsp;</a></span>phase2</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int phase2</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Phase segment 2, in number of time quanta </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="example_2c_2busparams_tq_8c-example.html#a11">example/c/busparams_tq.c</a>.</dd>
</dl>
</div>
</div>
<a id="af263c600d546b48e74f8f7ac7a891533"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af263c600d546b48e74f8f7ac7a891533">&#9670;&nbsp;</a></span>prescaler</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int prescaler</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Prescaler </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="example_2c_2busparams_tq_8c-example.html#a14">example/c/busparams_tq.c</a>.</dd>
</dl>
</div>
</div>
<a id="a4a8f6c91eefb9c6bf448592aac44153d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a8f6c91eefb9c6bf448592aac44153d">&#9670;&nbsp;</a></span>prop</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int prop</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Propagation segment, in number of time quanta </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="example_2c_2busparams_tq_8c-example.html#a13">example/c/busparams_tq.c</a>.</dd>
</dl>
</div>
</div>
<a id="a3b769dc9a0e203dea3cc931bdb304377"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b769dc9a0e203dea3cc931bdb304377">&#9670;&nbsp;</a></span>sjw</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int sjw</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sync jump width, in number of time quanta </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="example_2c_2busparams_tq_8c-example.html#a12">example/c/busparams_tq.c</a>.</dd>
</dl>
</div>
</div>
<a id="a4559f9255ccc9f785a33412fe5496d1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4559f9255ccc9f785a33412fe5496d1a">&#9670;&nbsp;</a></span>tq</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tq</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Total bit time, in number of time quanta. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="example_2c_2busparams_tq_8c-example.html#a9">example/c/busparams_tq.c</a>.</dd>
</dl>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="canlib_8h_source.html">canlib.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.13-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="structkv_bus_params_tq.html">kvBusParamsTq</a></li>
    <li class="footer"> (canlib 5.38) Tue Feb 15 2022</li>
  </ul>
</div>
</body>
</html>
